Hint (SQL)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
top
In various SQL implementations, a hint is an addition to the SQL standard that instructs the database engine on how to execute the query. For example, a hint may tell the engine to use or not to use an index (even if the query optimizer would decide otherwise).
Contents
β’ Implementation
β’ See also
β’ References
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Implementation
Different database engines use different approaches in implementing hints.
β’ EDB Postgres Advanced Server (a proprietary version of PostgreSQL from EnterpriseDB) offers hints compatible with those of Oracle.cite-ref-3[3]cite-ref-4[4]
β’ Microsoft SQL Server offers hints via the OPTION keyword cite-ref-5[5]
See also
References
cite-note-11. β MySQL 5.5 Reference Manual: 12.2.9.3 Index Hint Syntax
cite-note-22. β Mike Ault: Oracle SQL Hints Tuning
cite-note-33. β "Postgres Plus Advanced Server Performance and Scalability Guide: Query Optimization Hints". Archived from the original on 2014-04-19. Retrieved 2013-06-24.
cite-note-44. β "Postgres Plus Advanced Server Oracle Compatibility Developer's Guide: Optimizer Hints". Archived from the original on 2014-04-19. Retrieved 2013-06-24.
cite-note-55. β MSSQL 2017 Documentation